package com.example.demo.service;


import com.example.demo.model.Result;
import com.example.demo.model.user;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service
public interface userService {
    /**
     * 注册用户
     *
     * @param userName
     * @param pwd
     * @return
     */
    public Result<user> register(String userName, String pwd, int age, String phone, double money);

    /**
     * 执行登录逻辑，登录成功返回 User 对象
     *
     * @param userName
     * @param pwd
     * @return
     */
    public Result<user> login(String userName, String pwd);
    public int add(user user);
    public int update(user user);
    public int delete(int id);
    public user findByUserName(String username);

    user findByUserId(int id);
}
